-
-
Notifications
You must be signed in to change notification settings - Fork 2
BREAKING CHANGE!: Use Microsoft OpenAPI document instead of own model #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a major breaking change to rewrite the OpenAPI Client source generator to use Microsoft's OpenAPI document instead of the custom model. The change moves from a custom schema implementation to leveraging Microsoft.OpenApi libraries for parsing and processing OpenAPI specifications.
- Replaced custom OpenAPI schema models with Microsoft.OpenApi library
- Rewrote the source generator architecture to use a simpler, more direct approach
- Updated test infrastructure and added comprehensive test coverage for multiple OpenAPI versions
Reviewed Changes
Copilot reviewed 110 out of 116 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| OpenApiClientGenerator.cs | Complete rewrite to use Microsoft.OpenApi instead of custom schema parsing |
| OpenApi.Client.csproj | Updated dependencies and build configuration for new architecture |
| OpenApi.Client.SourceGenerators.csproj | New project structure with Microsoft.OpenApi dependencies |
| Test files | Added comprehensive test infrastructure with support for OpenAPI 1.2-3.1 specifications |
Comments suppressed due to low confidence (1)
src/OpenApi.Client.SourceGenerators/OpenApiClientGenerator.cs:56
- [nitpick] Method name 'ComputeClassForGeneration' is unclear. Consider renaming to 'ExtractMetadataFromSyntax' or 'ParseGeneratorMetadata' to better describe what the method does.
private static SourceGeneratorMetadata? ComputeClassForGeneration(
|
|
||
| GeneratorDriverRunResult result = driver.GetRunResult(); | ||
|
|
||
| var test = 1; |
Copilot
AI
Jul 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused variable 'test'. This appears to be leftover debug code that should be cleaned up.
| var test = 1; | |
| // (Line removed) |
| "type": "string" | ||
| }, | ||
| "description": "User roles." | ||
| }, |
Copilot
AI
Jul 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing comma in JSON object is invalid. Remove the comma after the 'roles' property on line 248.
| }, | |
| } |
Pull request type
Please check the type of change your PR introduces:
What is the new behavior?
Rewrite model.